# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-egg-timer
_pkgname=egg_timer
pkgver=1.3.0
pkgrel=3
pkgdesc='A simpler way to handle timeouts in Python.'
arch=('any')
url='https://pypi.org/project/egg-timer/#files'
license=('GPL3')
depends=('python')
makedepends=('python-build' 'python-pip')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('b5ea5f91a5b83b5e492b6af872a29d0423548273ff2025309a5016598636b7b878748b9d29ecf2e33a3d93fa18d333fa1738f7a02bca9d5c7f33b6e7caa06329')

build() {
  cd "$_pkgname-$pkgver"

  python -m build --wheel --outdir="$startdir/dist"
}

package() {
  cd "$_pkgname-$pkgver"

  pip install \
    --verbose \
    --disable-pip-version-check \
    --no-warn-script-location \
    --ignore-installed \
    --no-compile \
    --no-deps \
    --root="$pkgdir" \
    --prefix=/usr \
    --no-index \
    --find-links="file://$startdir/dist" \
    $_pkgname
}

